{template 'header','buyhelp'}
<div class="layout960">
	<ul class="inner-nav fn-clear">
		<li {if $catid==3274}class="current"{/if}><a href="{url('video/list','catid=3274')}" title="新车视频">新车视频</a></li>
		<li {if $catid==3275}class="current"{/if}><a href="{url('video/list','catid=3275')}" title="试驾测评">试驾测评</a></li>
		<li {if $catid==3273}class="current"{/if}><a href="{url('video/list','catid=3273')}" title="用车玩车">用车玩车</a></li>
		<li {if $catid==3271}class="current"{/if}><a href="{url('video/list','catid=3271')}" title="精彩广告">精彩广告</a></li>
		<li {if $catid==3277}class="current"{/if}><a href="{url('video/list','catid=3277')}" title="生活娱乐">生活娱乐</a></li>
		<li {if $catid==5154}class="current"{/if}><a href="{url('video/list','catid=5154')}" title="车展视频">车展视频</a></li>
	</ul>
</div>
<!--主体部分 start-->
<div class="video-top layout960 mt10 fn-clear">
	<div class="video-tleft fn-left fn-clear">
		<div id="J_Player" class="video-player fn-left">
			<embed src="{$tempList[0][videoUrl]}" type="application/x-shockwave-flash" width="360" allowFullScreen="true"  height="260" quality="high" wmode="transparent">
		</div>
		<ul id="J_PlayList" class="play-list fn-right">
			{loop $tempList $k $t}
			<li {if $k==0}class="current"{/if} video-url="{$t[videoUrl]}">
				<a class="img" href="javascript:void(0)" title="{$t[title]}">
					<img src="{Picture::thumb($t[thumb],93,58)}"  alt="{$t[title]}">
				</a>
				<div class="detail fn-clear">
					<h4><a href="javascript:void(0)" title="{$t[title]}">{$t[title]}</a></h4>
					<span>{timetodate($t[addtime],2)}</span>
				</div>
			</li>
			{/loop}
		</ul>
	</div>
	<div class="video-tright bd-tnone fn-right">
		<div class="index-block-title">
			<h2 class="fn-left">点击排行</h2>
		</div>
		<ul id="J_Rank" class="video-rank">
			{loop $hitsList $k $t}
			<li {if $k==0}class="current"{/if}>
				<div class="normal">
					<a href="{url('video/show','itemid='.$t['itemid'])}" title="{$t[title]}" target="_blank">{$t[title]}</a>
					<span>{timetodate($t[addtime],2)}</span>
				</div>
				<div class="active fn-clear">
					<a class="img" href="{url('video/show','itemid='.$t['itemid'])}" title="{$t[title]" target="_blank">
						<img src="{Picture::thumb($t[thumb],108,73)}"  alt="{$t[title]}">
					</a>
					<div class="detail">
						<h4><a href="{url('video/show','itemid='.$t['itemid'])}" title="{$t[title]" target="_blank">{$t[title]}</a></h4>
						<span>{$t[hits]}</span>
					</div>
				</div>
			</li>
			{/loop}
		</ul>
	</div>
</div>
{loop $catList $k $t}
{if !empty($t)}
<div class="video-list panel-rec-radius layout960 mt10">
	<div class="hd-rec-radius hd-26 fn-clear">
		<h3 class="fn-left">{get_category_name($k)}</h3>
		<a href="{url('video/list','catid='.$k)}" title="更多" class="more">更多>></a>
	</div>
	<ul class="img-news fn-clear">
		{loop $t $v}
		<li>
			<a href="{url('video/show','itemid='.$v[itemid])}" title="{$v[title]}" class="img" target="_blank">
				<img src="{Picture::thumb($v['thumb'], 148, 100)}"  alt="alt">
			</a>
			<a href="{url('video/show','itemid='.$v[itemid])}" title="{$v[title]}" target="_blank">{$v[title]}</a>
		</li>
		{/loop}
	</ul>
</div>
{/if}
{/loop}
<!--主体部分 end-->
<script>
	seajs.use(['$'],function($){
		var $player = $("#J_Player").children("embed");
		$("#J_PlayList>li").each(function(){
			$(this).find("a").click(function(){
				var videoUrl = $(this).parents("li").attr("video-url");
				var videoHtml = '<embed src="'+videoUrl+'" type="application/x-shockwave-flash" width="360" allowFullScreen="true"  height="260" quality="high">'
				$(this).parents("li").addClass("current").siblings('li').removeClass('current');
				$("#J_Player").html(videoHtml)
			});
		});

		$("#J_Rank>li").hover(function(){
			$(this).addClass("current").siblings('li').removeClass('current');
		})
	});
</script>
{template 'footer'}
